package com.android.fragmentdemo.adapters
import com.hengfoxwolf.commonbase.base.databeans.SlipItem
import com.android.fragmentdemo.databinding.RvDynamicLayout04Binding
import com.hengfoxwolf.commonbase.base.adapter.BaseRvAdapter2

class DynamicItem04Adapter() :
    BaseRvAdapter2<SlipItem, RvDynamicLayout04Binding>(RvDynamicLayout04Binding::inflate) {
    override fun bindData(holder: ViewHolder, dataItem: SlipItem, position: Int) {
        holder.binding.itemDy04.setBackgroundColor(holder.binding.root.resources.getColor(dataItem.color))
        val textContent = "${dataItem.number + 1}"
        holder.binding.itemDy04.text = textContent
    }
}